home *** CD-ROM | disk | FTP | other *** search
- // Class: CLASS_NAME Visual C++ Windows Exe
-
- #ifndef __$CAPITALIZE_ALL$CLASS_NAME$_H //Required for current class
- #define __$CAPITALIZE_ALL$CLASS_NAME$_H
-
- [ //Required for base classes
- #ifndef __$CAPITALIZE_ALL$BASE_CLASS$_H
- #include "$BASE_CLASS$.h"
- #endif
- ]
-
- [#include <INCLUDE_FILE> //Required for include files, eg <CList.h>
- ]
-
- [ //Required for 1:1 associated classes
- #ifndef __$CAPITALIZE_ALL$ASSOCIATION_ONE_CLASS$_H
- #include "$ASSOCIATION_ONE_CLASS.h"
- #endif
- ]
-
- [ //Required for 1:1 aggregation (part) classes
- #ifndef __$CAPITALIZE_ALL$AGGREGATION_ONE_CLASS$_H
- #include "$AGGREGATION_ONE_CLASS$.h"
- #endif
- ]
-
- [ //Required for 1:M associated classes
- #ifndef __$CAPITALIZE_ALL$ASSOCIATION_MANY_CLASS$_H
- #include "$ASSOCIATION_MANY_CLASS$.h"
- #endif
- ]
-
- [ //Required for 1:M aggregation (part) classes
- #ifndef __$CAPITALIZE_ALL$AGGREGATION_MANY_CLASS$_H
- #include "$AGGREGATION_MANY_CLASS$.h"
- #endif
- ]
-
- class CLASS_NAME[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS
- { [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
- [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
- [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
- [CList <ASSOCIATION_MANY_CLASS, ASSOCIATION_MANY_CLASS&> ASSOCIATION_MANY_NAME;]
- [CList <AGGREGATION_MANY_CLASS, AGGREGATION_MANY_CLASS&> AGGREGATION_MANY_NAME;]
- public:
- //Default constructor
- //Update to access base class attributes
- //Update to access 1:1 part class attributes
- //Update to access 1:M part class attributes
- //Update to access 1:1 associated class attributes
- //Update to access 1:M associated class attributes
- //Ensure initial values entered
- CLASS_NAME () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL] { }
-
- //Constructor with arguments
- CLASS_NAME ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )
- : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }
-
-
- //Copy constructor
- //Update to access 1:M part class attributes
- //Update to access 1:1 associated class attributes
- //Update to access 1:M associated class attributes
- CLASS_NAME (const CLASS_NAME$& a$CLASS_NAME ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS_NAME),DELETE_LAST_SYMBOL]
- { [ ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
- [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]
- }
-
- //Operator= Assignment Operator
- //Update to access 1:M part class attributes
- //Update to access 1:1 associated class attributes
- //Update to access 1:M associated class attributes
- CLASS_NAME operator= (const CLASS_NAME$& a$CLASS_NAME)
- { if (this == &a$CLASS_NAME) return *this;
- [BASE_CLASS$::operator= (a$CLASS_NAME);]
- [ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
- [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]
- return *this;
- }
-
- //Operator== Equality Operator
- //Update to access 1:M part class attributes
- //Update to access 1:1 associated class attributes
- //Update to access 1:M associated class attributes
- int operator== (const CLASS_NAME$& a$CLASS_NAME)
- { return (
- [ (BASE_CLASS$::operator== (a$CLASS_NAME)) &&]
- [ (AGGREGATION_ONE_NAME == a$CLASS_NAME$.$AGGREGATION_ONE_NAME) &&]
- [ (ATTRIBUTE_NAME == a$CLASS_NAME$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
- );
- }
-
- [ //Get accessor function for attribute
- ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
- {return ATTRIBUTE_NAME$;
- }
- ]
-
- [ //Set accessor function for attribute
- void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
- { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
- }
- ]
-
- [ //Get accessor function for 1:1 aggregation
- AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$()
- {return AGGREGATION_ONE_NAME$;
- }
- ]
-
- [ //Set accessor function for 1:1 aggregation
- void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
- { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
- }
- ]
-
- [ //Get accessor function for 1:1 association
- ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
- {return ASSOCIATION_ONE_NAME$;
- }
- ]
-
- [ //Set accessor function for 1:1 association
- void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
- { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
- }
- ]
-
- [ CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
- ]
-
- OPERATION_CPP_VIRTUAL_BASE_CLASS ~ CLASS_NAME ( ) { } //Destructor
- };
-
- #endif